<template>
  <div>
    <!--  我的分享码弹窗  -->
    <el-dialog
      title="我的分享码"
      :visible.sync="open"
      width="800px"
      :before-close="close">
      <div class="edit-box" v-if="list && list.length>0">
        <el-table :data="list" align="center" style="width: 100%" border>
          <el-table-column prop="shareName" label="分享码别名" align="center"/>
          <el-table-column prop="id" label="分享码" align="center"/>
          <el-table-column prop="addTime" label="创建时间" align="center"/>
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="close('cancel')">取 消</el-button>
        <el-button type="primary" @click="close()">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: 'order-list',
  props: {
    list: {
      type: Array,
      default: []
    }
  },
  data() {
    return {
      open: true,
    }
  },
  methods: {
    // 关闭线上发货弹窗
    close() {
      this.$emit('closeShareCodeModal', false)
    },
  }
}
</script>
<style scoped>
.el-divider__text {
  font-size: 16px;
  font-weight: bold;
  color: #000;
}
</style>
